/**
Message.java creates a simple class that reads a message and gets source address.
@author "Brittney and Lyly"
*/
import java.util.*;


public class Message
implements java.io.Serializable
{
	private Address src;
	private int[] numbers;
	private String msg;

	private static int gIdCount = 0;
	private int id;
	
	/** Message takes the string message and the source address */
	public Message(String message)
	{
		msg = message;
		id = gIdCount++;
			
	}
	
	public Message(String message, int[] nums){
		msg = message;
		numbers = nums;
		id = gIdCount ++;
	}
	/** getAddress gets the source address of the message */ 
	
	public int[] getNumbers(){
		return numbers;
	}
	
	public  Address getSrc ()
	{
		return src;
	}
	/**getPayLoad 
			@return returns the payload */
	public String getMsg () { return msg; }

	/** setPayload()
			@return returns payload Message  */
	public String setMsg (String m)
	{	return msg = m; }

	public Address setSrc (Address a)
	{	return src = a; }
}
